<?php 
/**
* @author Oliver Leisalu, Inditel Meedia
* @package DomFg
* @subpackage Input
*/
class DomFgRadio extends DomFgInput {
	
	protected $checked;
	
	protected $value;
	
	public function __construct( $name = NULL, $checked = NULL ) {
		parent::__construct( $name );
		$this->checked( $checked );
	}
	
	public function checked( $checked ) {
		$this->checked = (bool)$checked;
		return $this;
	}
	
	public function value( $value ) {
		$this->value = $value;
		return $this;
	}
	
	public static function parsePost( $name, &$value ) {
		return $value;
	}
	
	public function render() {
		$renderer = $this->getRenderer();
		$renderer->assign('input', $this );
		return $renderer->fetch('Input/Radio.html');
	}
	

}
?>